
import 'package:jubobao/services/JuBoHttpRequest.dart';

import 'JuBoForumModel.dart';

class JuBoForumServices
{
    static Future<List<JuBoForumModel>> request (int id,int index) async {

    final result = await JuBoHttpRequest.request(
                              'atapi/GetLTPostList',
                              params: {
                                 'posttypeid' : id,
                                 'PageSize':index,
                                 'UserID' : 676,
                                  'hot':'',
                                  'Rank' :''
                              }
                          );
    final list = result['ReList'];
    List<JuBoForumModel> results = [];
    for(var json in list){
      results.add(JuBoForumModel.fromJson(json));
    }
    return results;
   }

}